package me.nibo.tree.bean;

import me.nibo.tree.utils.annotation.TreeNodeId;
import me.nibo.tree.utils.annotation.TreeNodeLabel;
import me.nibo.tree.utils.annotation.TreeNodePid;

/**
 * 组织机构类
 *
 * @author nibo
 */
public class OrgBean {
    // 组织id
    @TreeNodeId
    private String id;
    // 组织父id
    @TreeNodePid
    private String pid;
    // 组织名称
    @TreeNodeLabel
    private String label;
    // 组织描述
    private String desc;

    public OrgBean() {
    }

    /**
     *
     * @param id 组织id
     * @param label 组织名称
     */
    public OrgBean(String id, String label) {
        this.id = id;
        this.label = label;
    }

    /**
     *
     * @param id 组织id
     * @param pid 组织父id
     * @param label 组织名称
     */
    public OrgBean(String id, String pid, String label) {
        this.id = id;
        this.pid = pid;
        this.label = label;
    }

    /**
     * @param id    组织id
     * @param pid   组织父id
     * @param label 组织名称
     * @param desc  组织描述
     */
    public OrgBean(String id, String pid, String label, String desc) {
        this.id = id;
        this.pid = pid;
        this.label = label;
        this.desc = desc;
    }

    /**
     * @return 组织id
     */
    public String getId() {
        return id;
    }

    /**
     * @param id 组织id
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * @return 组织父id
     */
    public String getPid() {
        return pid;
    }

    /**
     * @param pid 组织父id
     */
    public void setPid(String pid) {
        this.pid = pid;
    }

    /**
     * @return 组织名称
     */
    public String getLabel() {
        return label;
    }

    /**
     * @param label 组织名称
     */
    public void setLabel(String label) {
        this.label = label;
    }

    /**
     * @return 组织描述
     */
    public String getDesc() {
        return desc;
    }

    /**
     * @param desc 组织描述
     */
    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Override
    public String toString() {
        return "OrgBean{" +
                "id='" + id + '\'' +
                ", pid='" + pid + '\'' +
                ", label='" + label + '\'' +
                ", desc='" + desc + '\'' +
                '}';
    }
}
